<?php

class Inspire extends CI_Controller{
function add_inspire($id1,$id2){
$num = $this->cek_inspire($id1,$id2);
if ($num==0){
$query= "insert into inspired values ('$id1','$id2')";
$stat=$this->db->simple_query($query);
echo $stat;
}else{
echo false;
}

}
function cek_inspire ($id1,$id2){
$query="select * from inspired where `siapa`='$id1' and `bagi`='$id2'";
$result=$this->db->query($query);
$num = $result->num_rows();
return $num;
}

function rem_inspire($id1,$id2){
$q= "delet from inspired where where `siapa`='$id1' and `bagi`='$id2'";
$result= $this->db->query($q);
}


}